class ListUtils:
    @staticmethod
    def contains_key(list, pair):
        index = -1
        list_len = len(list)
        if not list or list_len == 0:
            return index
        key = pair['key']
        value = pair['value']
        for i in range(list_len):
            if list[i][key] == value:
                index = i
                break;

        return index
